import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:gameplay_flutter/m_room/room_controller/room_controller.dart';
import 'package:get/get.dart';

import '../room_controller/room_stateless_controller_mixin.dart';
import 'room_mic.dart';

class RoomMicList extends StatelessWidget
    with StatelessControllerMixin<RoomController> {
  const RoomMicList({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    RoomController roomController = getRoomController(context);
    return Obx(() => GridView.count(
          shrinkWrap: true,
          padding: EdgeInsets.only(top: 20.h),
          crossAxisCount: 5,
          childAspectRatio: 0.8,
          children: roomController.mics
              .map((mic) => RoomMic(
                    roomMicModel: mic,
                  ))
              .toList(),
        ));
  }
}
